-
-
Notifications
You must be signed in to change notification settings - Fork 28
fix: multiple issue fixes #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
nonara
commented
Jul 29, 2020
- Allow more than one path routing (fixes Only transforms if relative to first path in the array #60)
- Remove implicit extensions from output (fixes Import not generated #24)
- Properly implemented isTypeOnly (fixes Importing a mix of types and values in an import using a custom path results in undefined imports in result JavaScript #48)
- Corrected errors in tests due to TS changing logic for type only star exports
- Bonus: Made package zero-dependency
@@ -96,17 +116,6 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => ( | |||
node.arguments.length === 1; | |||
|
|||
function visit(node: ts.Node): ts.VisitResult<ts.Node> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note on TS changes regarding type only exports
It seems that types only export behaviour has changed in TypeScript. For one, they added isTypeOnly
, but they've also changed the standard behaviour of export * from 'module'
and import 'module'
Even if module
has only type exports, this line will still get compiled into the final result. This was causing the tests to fail, by default, after cloning the package. In order to match the prescribed TS behaviour , we've added the isTypeOnly
param where needed as well as removed the following conditional.
In short, this means the TS compiler has taken over this logic.
@@ -1,5 +1,7 @@ | |||
import sum = require("@utils/sum"); | |||
export { sum } from "@utils"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows testing for secondary path routing
That's great @nonara , I'll definitely take my time in the evening to proper review it and test it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great job :D!
@all-contributors add @nonara for bug, test, and code |
Thanks. 😄 |
I've put up a pull request to add @nonara! 🎉 |
Whoops had the wrong issue number on one. Tagged an already closed issue Path extensions also fixes #59 |
The fix is up in v1.1.15 🎉, many thanks for the amazing contribution @nonara! |